/*
package com.yixia.common.utils.security;


import com.yixia.common.domain.LoginUser;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;

*/
/**
 * Security工具类
 *//*

public class SecurityUtils {

    */
/**
     * 获取Authentication
     *//*

    public static Authentication getAuthentication()
    {
        return SecurityContextHolder.getContext().getAuthentication();
    }

    */
/**
     * 获取用户
     **//*

    public static LoginUser getLoginUser()
    {
        return (LoginUser) getAuthentication().getPrincipal();
    }

    */
/**
     * 获取用户id
     * 用户ID
     **//*

    public static Long getUserId()
    {
        return getLoginUser().getUserId();
    }
}
*/
